<template>
  <view class="fixed top-0 left-0 w-[100vw] h-[100vh]">
    <!-- <view class="flex-center w-full h-full text-2xl font-bold">Chat</view> -->
    <web-view class="w-full h-full" :src="url" />
  </view>
</template>

<script setup lang="ts">
import Taro from '@tarojs/taro'
import { ref, onMounted } from 'vue'
import { useUserStore } from "@/store/user";
import { storeToRefs } from "pinia"
import {post,getFullPath} from "@/utils/request"

// 用户信息
const userStore = useUserStore();
const {userInfo} = storeToRefs(userStore);
const url = ref('')
// const account = ref('')
// const token = ref('')

onMounted(() => {
  const params = Taro.getCurrentInstance().router?.params
  // const other = params?.other
  const other = '1768234470818'
//   const token = params?.token
  // url.value = `http://${window.location.hostname}:5173/?account=${userInfo.value.imaccid}&token=${userInfo.value.imtoken}&stranger=${other}`
  url.value = `https://www.h5.nl9555.com/chats/index.html?account=${userInfo.value.imaccid}&token=${userInfo.value.imtoken}&stranger=${other}`

  // window.open(url.value)
})
</script>

<style scoped lang="scss"></style>